import { Map } from "immutable";
import { CHANGE_USER_INFO } from "./constant";

const defaultState = Map({
  userInfo: {},
});

function reducer(state = defaultState, { type, data }) {
  switch (type) {
    case CHANGE_USER_INFO:
      return state.set("userInfo", data);
    default:
      return state;
  }
}
export default reducer;
